The present invention provides a simple yet highly accurate device for producing a signal indicative of whether a given object is within an acceptable range of distances from the apparatus and also to provide a signal indicative of whether the object is beyond the near side of the acceptable range or beyond the far side of the acceptable range. Devices of this nature have uses in, for example, robot control where it is desired to have the robot arm move out and operate on an object so long as the object is within an acceptable range of the arm. Another example of possible use is in filling containers with material to determine that the level of material is in an acceptable range and neither too full nor too empty. It is also desirable that the equipment be compact for easy mounting on a robot arm or above a conveyer belt, that it be easy to adjust, quite accurate, and preferrably have a detection zone which may be set to predetermine desired acceptable limits while at the same time allowing for settings to adjust the distance between the apparatus and the remote object so that it may be used in various applications.